/**
 * Copyright &copy; 2012-2014 <a href="http://www.iframework.cn">Mas</a> All rights reserved.
 */
package com.iframework.mas.modules.accident.entity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.iframework.mas.common.persistence.DataEntity;

/**
 * 事故列表Entity
 * @author 余艾龙
 * @version 2016-01-30
 */
public class Accident extends DataEntity<Accident> {
	
	private static final long serialVersionUID = 1L;
	private Date accidentdatetime;		// 事故发生时间
	private String status;		// 事故状态
	private String accidentinfo;		// 事故事实
	private String accidentno;		// 认字编号
	private String source;		// 事故单来源
	private String remark;		// remark
	private Date beginAccidentdatetime;		// 开始 事故发生时间
	private Date endAccidentdatetime;		// 结束 事故发生时间
	private List<Accidentcar> accidentcarList = Lists.newArrayList();		// 事故车辆子表列表
	private List<Accidenter> accidenterList = Lists.newArrayList();		// 事故责任人子表列表
	private Accidentlocation accidentlocation = new Accidentlocation();		// 事故地点
	private List<Accidentpic> accidentpicList = Lists.newArrayList();		// 事故图片子表列表
	private Accidentresult accidentresult = new Accidentresult();		// 事故判决结果
	
	public Accident() {
		super();
	}

	public Accident(String id){
		super(id);
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="事故发生时间不能为空")
	public Date getAccidentdatetime() {
		return accidentdatetime;
	}

	public void setAccidentdatetime(Date accidentdatetime) {
		this.accidentdatetime = accidentdatetime;
	}
	
	@Length(min=0, max=11, message="事故状态长度必须介于 0 和 11 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	@Length(min=0, max=50, message="事故事实长度必须介于 0 和 50 之间")
	public String getAccidentinfo() {
		return accidentinfo;
	}

	public void setAccidentinfo(String accidentinfo) {
		this.accidentinfo = accidentinfo;
	}
	
	@Length(min=0, max=50, message="认字编号长度必须介于 0 和 50 之间")
	public String getAccidentno() {
		return accidentno;
	}

	public void setAccidentno(String accidentno) {
		this.accidentno = accidentno;
	}
	
	@Length(min=0, max=11, message="事故单来源长度必须介于 0 和 11 之间")
	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}
	
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public Date getBeginAccidentdatetime() {
		return beginAccidentdatetime;
	}

	public void setBeginAccidentdatetime(Date beginAccidentdatetime) {
		this.beginAccidentdatetime = beginAccidentdatetime;
	}
	
	public Date getEndAccidentdatetime() {
		return endAccidentdatetime;
	}

	public void setEndAccidentdatetime(Date endAccidentdatetime) {
		this.endAccidentdatetime = endAccidentdatetime;
	}
		
	public List<Accidentcar> getAccidentcarList() {
		return accidentcarList;
	}

	public void setAccidentcarList(List<Accidentcar> accidentcarList) {
		this.accidentcarList = accidentcarList;
	}
	public List<Accidenter> getAccidenterList() {
		return accidenterList;
	}

	public void setAccidenterList(List<Accidenter> accidenterList) {
		this.accidenterList = accidenterList;
	}
	public Accidentlocation getAccidentlocation() {
		return accidentlocation;
	}

	public void setAccidentlocation(Accidentlocation accidentlocation) {
		this.accidentlocation = accidentlocation;
	}
	public List<Accidentpic> getAccidentpicList() {
		return accidentpicList;
	}

	public void setAccidentpicList(List<Accidentpic> accidentpicList) {
		this.accidentpicList = accidentpicList;
	}
	public Accidentresult getAccidentresult() {
		return accidentresult;
	}

	public void setAccidentresult(Accidentresult accidentresult) {
		this.accidentresult = accidentresult;
	}
}